home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
bench
/
x.txt
/
000075_fdc@watsun.cc.columbia.edu_Fri Oct 26 09:55:43 EDT 2001.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
2KB
|
61 lines
Article: 12888 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.sys.hp.hpux,comp.protocols.kermit.misc
Subject: Re: rm files older than 14 days
Date: 26 Oct 2001 13:51:22 GMT
Organization: Columbia University
Lines: 44
Message-ID: <9rbpoq$ral$1@newsmaster.cc.columbia.edu>
References: <3bd91c1e$1@netnews.web.de>
NNTP-Posting-Host: watsun.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1004104282 27989 128.59.39.2 (26 Oct 2001 13:51:22 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 26 Oct 2001 13:51:22 GMT
Xref: newsmaster.cc.columbia.edu comp.sys.hp.hpux:142454 comp.protocols.kermit.misc:12888
In article <3bd91c1e$1@netnews.web.de>,
Christian Hartmann <christian.hartmann@sheego.com> wrote:
: I am looking for the command to remove files in a given directory which
: are older than 14 days. I've got the following command, which is running
: under linux, but unfortunately not under hp-ux.
:
: find /<directory_to_seek_in>/ -type -f -mtime +14 -print0 | xargs 0r- n
: $(getconf ARG_MAX) -P0 rn -fv
:
The next release of C-Kermit, 8.0:
http://www.columbia.edu/kermit/ck80.html
would let you do it like this:
delete /before:-14days *
or:
delete /before:-2weeks *
where "*" applies to the current directory. You might find this more
intuitive than the many permutations of find, xargs, and their options.
If you wanted the file specification to apply recursively, then:
delete /before:-2weeks /recursive *
And if you wanted to add exception lists, size qualifiers, etc, you could do
that too:
C-Kermit>del ? File specification; or switch, one of the following:
/after: /except: /nodotfiles /not-before: /summary
/ask /heading /noheading /page /tree
/before: /larger-than: /nolist /recursive /type:
/directories /list /nopage /simulate
/dotfiles /noask /not-after: /smaller-than:
C-Kermit>del
Since C-Kermit is part of HP-UX, presumably it will be updated by HP
when the new version is released. If not, you can get it from Columbia
for all HP-UX version from 5 to 11.
- Frank